\hypertarget{class_dispatcher}{
\section{Dispatcher Class Reference}
\label{class_dispatcher}\index{Dispatcher@{Dispatcher}}
}


{\ttfamily \#include $<$dispatcher.h$>$}

\subsection*{Public Slots}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_dispatcher_a5fd444604d8eadaafac5791f9947f021}{requestReceived} (\hyperlink{class_request}{Request} $\ast$req)
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_dispatcher_aa97cd04e05de526ce5d7f5bdba572f23}{Dispatcher} (QObject $\ast$parent=0)
\item 
void \hyperlink{class_dispatcher_a95437a6831a0f727a64d8490cf65a49f}{takeInControl} (\hyperlink{class_elevator}{Elevator} $\ast$elevator)
\end{DoxyCompactItemize}
\subsection*{Private Slots}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_dispatcher_a5472cf1335843f5fa4655519b0e0bd94}{dispatchRequestPool} ()
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_dispatcher_ae261007a9a8d84ed18cd30c4694be2fa}{
QMap$<$ int, \hyperlink{class_elevator}{Elevator} $\ast$ $>$ \hyperlink{class_dispatcher_ae261007a9a8d84ed18cd30c4694be2fa}{elevators}}
\label{class_dispatcher_ae261007a9a8d84ed18cd30c4694be2fa}

\begin{DoxyCompactList}\small\item\em List of the elevators taken into control. \end{DoxyCompactList}\item 
\hypertarget{class_dispatcher_a93d6aeb2b2dcb6383f7f1522ac4695dd}{
QList$<$ \hyperlink{class_request}{Request} $\ast$ $>$ \hyperlink{class_dispatcher_a93d6aeb2b2dcb6383f7f1522ac4695dd}{requestPool}}
\label{class_dispatcher_a93d6aeb2b2dcb6383f7f1522ac4695dd}

\begin{DoxyCompactList}\small\item\em List of requests unable to dispatch (Waiting for dispatch) \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{class_dispatcher}{Dispatcher} Object Receive requests and decide which elevator should take the job 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_dispatcher_aa97cd04e05de526ce5d7f5bdba572f23}{
\index{Dispatcher@{Dispatcher}!Dispatcher@{Dispatcher}}
\index{Dispatcher@{Dispatcher}!Dispatcher@{Dispatcher}}
\subsubsection[{Dispatcher}]{\setlength{\rightskip}{0pt plus 5cm}Dispatcher::Dispatcher (
\begin{DoxyParamCaption}
\item[{QObject $\ast$}]{parent = {\ttfamily 0}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, explicit\mbox{]}}}}
\label{class_dispatcher_aa97cd04e05de526ce5d7f5bdba572f23}
Construct a \hyperlink{class_dispatcher}{Dispatcher} object 

\subsection{Member Function Documentation}
\hypertarget{class_dispatcher_a5472cf1335843f5fa4655519b0e0bd94}{
\index{Dispatcher@{Dispatcher}!dispatchRequestPool@{dispatchRequestPool}}
\index{dispatchRequestPool@{dispatchRequestPool}!Dispatcher@{Dispatcher}}
\subsubsection[{dispatchRequestPool}]{\setlength{\rightskip}{0pt plus 5cm}void Dispatcher::dispatchRequestPool (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, private, slot\mbox{]}}}}
\label{class_dispatcher_a5472cf1335843f5fa4655519b0e0bd94}
Slot invoked to try to dispatch the \hyperlink{class_request}{Request} in requestPool to the most suitable \hyperlink{class_elevator}{Elevator} 

Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_dispatcher_a5472cf1335843f5fa4655519b0e0bd94_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_dispatcher_a5472cf1335843f5fa4655519b0e0bd94_icgraph}
\end{center}
\end{figure}


\hypertarget{class_dispatcher_a5fd444604d8eadaafac5791f9947f021}{
\index{Dispatcher@{Dispatcher}!requestReceived@{requestReceived}}
\index{requestReceived@{requestReceived}!Dispatcher@{Dispatcher}}
\subsubsection[{requestReceived}]{\setlength{\rightskip}{0pt plus 5cm}void Dispatcher::requestReceived (
\begin{DoxyParamCaption}
\item[{{\bf Request} $\ast$}]{req}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, slot\mbox{]}}}}
\label{class_dispatcher_a5fd444604d8eadaafac5791f9947f021}
Slot for the dispatcher to obtain the \hyperlink{class_request}{Request} 

Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_dispatcher_a5fd444604d8eadaafac5791f9947f021_cgraph}
\end{center}
\end{figure}


\hypertarget{class_dispatcher_a95437a6831a0f727a64d8490cf65a49f}{
\index{Dispatcher@{Dispatcher}!takeInControl@{takeInControl}}
\index{takeInControl@{takeInControl}!Dispatcher@{Dispatcher}}
\subsubsection[{takeInControl}]{\setlength{\rightskip}{0pt plus 5cm}void Dispatcher::takeInControl (
\begin{DoxyParamCaption}
\item[{{\bf Elevator} $\ast$}]{elevator}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_dispatcher_a95437a6831a0f727a64d8490cf65a49f}
Register an \hyperlink{class_elevator}{Elevator} object. So that when a request is received, the \hyperlink{class_elevator}{Elevator} will be taken in to consideration to dispatch the request. 

Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_dispatcher_a95437a6831a0f727a64d8490cf65a49f_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=386pt]{class_dispatcher_a95437a6831a0f727a64d8490cf65a49f_icgraph}
\end{center}
\end{figure}




The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
dispatcher.h\end{DoxyCompactItemize}
